package com.chenxbook.modules.jbpm4.handler;

import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.task.Assignable;
import org.jbpm.api.task.AssignmentHandler;

/**
 *  定义一个简单地任务分配器
 * */
public class AssignTaskHandler  implements AssignmentHandler {

    String assignee;
    @Override
    public void assign(Assignable assignable, OpenExecution openExecution) throws Exception {
        //设置任务的分配者
        assignable.setAssignee(assignee);
    }
}
